package we3d.animation.modifier
{
	public class Oscillator implements IModifier 
	{
		public function Oscillator (_frames:Number, _max:Number, _side:Number=0){ 
			frames = _frames;
			max = _max;
			side = _side;
		}
		
		public var frames:Number;
		public var side:Number;
		public var max:Number;
		
		public function evaluate (frame:Number, value:Number, kf:int, lkf:int) :Number {	
			return value + (Math.cos((frame*Math.PI/(frames)))*max) + (max*side);
		}
		
	}
}
